package Object_study;

public class Object_study1 {
    public static void main(String[] args) {
        Person p = new Person("王多鱼",18);
        String s = p.toString();
        System.out.println(s);
        //Object_study.Person@75412c2f
        System.out.println(p);
        //Object_study.Person@75412c2f
        //直接打印对象的名字，就是调用toString方法，使p=p.toString
    }
}
